package com.sheepone.distributor.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Miss.杨
 * @description
 * @since 2023-12-07 22:04
 */
@ConfigurationProperties(prefix = "distributor")
public class WorkerStationConfig {
    private List<Config> workerStations = new ArrayList<>();

    public List<Config> getWorkerStations() {
        return workerStations;
    }

    public void setWorkerStations(List<Config> workerLines) {
        this.workerStations = workerLines;
    }

    public static class Config {
        private String station;
        private int lineSize = 1024;
        private int handlerNum = 1;
        private int keepAliveTime = 60;
        public String getStation() {
            return station;
        }

        public void setStation(String stationName) {
            this.station = stationName;
        }

        public int getLineSize() {
            return lineSize;
        }

        public void setLineSize(int lineSize) {
            this.lineSize = lineSize;
        }

        public int getHandlerNum() {
            return handlerNum;
        }

        public void setHandlerNum(int handlerNum) {
            this.handlerNum = handlerNum;
        }

        public int getKeepAliveTime() {
            return keepAliveTime;
        }

        public void setKeepAliveTime(int keepAliveTime) {
            this.keepAliveTime = keepAliveTime;
        }

    }
}
